package mvpfoot.model;



import java.io.File;

import mvpfoot.entity.Stores;
import mvpfoot.entity.User;
import mvpfoot.entity.ZhiHuDaily;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.Url;

/**
 * Created by Chen qin lang on 2016/12/27.
 */
public interface NetworkApi {
    @GET()
    Call<User> getUser(@Query("name") String name);
    @GET("news/latest")
    Call<ZhiHuDaily> getInfo();

    @Multipart
    @POST()
    Call<ResponseBody> uploadFile(@Part("description")RequestBody requestBody, @Part MultipartBody.Part file);

    @Multipart
    @POST
    Call<ResponseBody> upload(@Url String url,@Part("image\";filename\"=imagr.jpg")RequestBody requestBody);

}
